package com.yunhe.policyfulfillment.policyful.repository;

import com.yunhe.policyfulfillment.policyful.domain.PolicyCommonQuestion;
import com.yunhe.policyfulfillment.policyful.model.PolicyCommonQuestionVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author zhengbo
 * @date 2021/10/12 17:50
 */
@Repository
public interface PolicyCommonQuestionRepository {

    /**
     * 新增
     * @author zb
     * @date 2021/10/12
     **/
    int createPolicyCommonQuestionSelective(PolicyCommonQuestion policyCommonQuestion);

    /**
     * 刪除
     * @author zb
     * @date 2021/10/12
     **/
    void deletePolicyCommonQuestionByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author zb
     * @date 2021/10/12
     **/
    void updatePolicyCommonQuestionByPrimaryKeySelective(PolicyCommonQuestion policyCommonQuestion);

    /**
     * 根据主键查询
     * @author zb
     * @date 2021/10/12
     **/
    PolicyCommonQuestion searchPolicyCommonQuestionByPrimaryKey(@Param("id") int id);

    /**
     * 按照时间更新状态
     */
    void publishTimedCommonQuestion();

    List<PolicyCommonQuestion> searchPolicyCommonQuestionByCondition(Map map);

    void updatePolicyCommonQuestionViewsById(@Param("id") Long id);
}
